<template>
  <div>
    <h1> {{ $route.params.id }}</h1>
   
    <router-link to="/message">跳到消息</router-link>
  </div>
</template>
<script>
  export default{
    mounted (){
      console.log(this.$route.params.id)
    }
  }
</script>

<style scoped >
  div{
    color: #f60;
    font-size: 24px;
  }
</style>